package ch.hearc.coursJava.moo.statics;

import static org.junit.Assert.assertTrue;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class CompteUBSTest
	{

	/*------------------------------------------------------------------*\
	 |*							Constructeurs							*|
	 \*------------------------------------------------------------------*/

	@Before
	public void before()
		{
		// rien
		}

	@After
	public void after()
		{
		// rien
		}

	/*------------------------------------------------------------------*\
	 |*							Methodes Public							*|
	 \*-----------------------------------------------------------------*/

	@Test
	public void testTauxNul()
		{
		CompteUBS.setTaux(0);
		assertTrue((new CompteUBS(5000)).getVraiMontant() == 5000);
		}

	@Test
	public void testTauxNormal()
		{
		CompteUBS.setTaux(10/(double)100);
		assertTrue((new CompteUBS(5000)).getVraiMontant() == 5500);
		}

	@Test
	public void testTauxNegatif()
		{
		CompteUBS.setTaux(-10/(double)100);
		assertTrue((new CompteUBS(5000)).getVraiMontant() == 4500);
		}

	/*------------------------------------------------------------------*\
	|*							Methodes Private						*|
	\*------------------------------------------------------------------*/

	}
